package com.disability_federation.mapper;

import com.disability_federation.pojo.CountyAmountsWithhold;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 区县级残保金代扣名单-数据库接口
 */
@Mapper
public interface MapperCountyAmountsWithhold {

    //查询全部代扣名单
    //默认时间升序排序
    //@Select("select * from county_amounts_withhold.county_amounts_withhold order by #{这里可以放变量}")
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by collection_time")
    List<CountyAmountsWithhold> query();

    //查询全部代扣名单
    //时间降序排序
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by collection_time desc")
    List<CountyAmountsWithhold> queryDesc();

    //查询全部代扣名单
    //金额升序序排序
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by money")
    List<CountyAmountsWithhold> queryMoneyAsc();

    //查询全部代扣名单
    //金额降序排序
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by money desc")
    List<CountyAmountsWithhold> queryMoneyDesc();

    //查询全部代扣名单
    //姓名升序排序
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by user_name")
    List<CountyAmountsWithhold> queryNameAsc();

    //查询全部代扣名单
    //姓名降序排序
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by user_name desc")
    List<CountyAmountsWithhold> queryNameDesc();

    //查询全部代扣名单
    //单位升序排序
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by unit")
    List<CountyAmountsWithhold> queryUnitAsc();

    //查询全部代扣名单
    //单位降序排序
    @Select("select * from county_amounts_withhold.county_amounts_withhold order by unit desc")
    List<CountyAmountsWithhold> queryUnitDesc();

    //条件查询代扣名单
    //默认时间升序排序
    List<CountyAmountsWithhold> queryCondition(String name, String enterprise, Integer money1, Integer money2);

    //条件查询代扣名单
    //时间降序排序
    List<CountyAmountsWithhold> queryConditionDesc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询代扣名单
    //金额升序排序
    List<CountyAmountsWithhold> queryConditionMoneyAsc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询代扣名单
    //金额降序排序
    List<CountyAmountsWithhold> queryConditionMoneyDesc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询代扣名单
    //姓名升序排序
    List<CountyAmountsWithhold> queryConditionNameAsc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询代扣名单
    //姓名降序排序
    List<CountyAmountsWithhold> queryConditionNameDesc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询代扣名单
    //单位降序排序
    List<CountyAmountsWithhold> queryConditionUnitAsc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询代扣名单
    //单位升序排序
    List<CountyAmountsWithhold> queryConditionUnitDesc(String name, String enterprise, Integer money1, Integer money2);
}
